import random
start = int(input("开始值"))
end = int(input("结束值"))
i = random.randint(start,end)
n = int(input("请输入猜测次数："))
num = 1
while num <= n:
    test = int(input("请输入猜测值："))
    if test == i:
        print('right')
        break
    elif test < i:
        print('too small')
    elif test > i:
        print("too large")
    if num == n:
        print(f"游戏结束,正确答案是{i}")
    num += 1


